package o;

import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.net.Uri;
import android.os.ParcelFileDescriptor;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.InputStream;

public class vq<Data> implements vk<Integer, Data> {
    private final Resources ˋ;
    private final vk<Uri, Data> ॱ;

    public static final class b implements vr<Integer, AssetFileDescriptor> {
        private final Resources ॱ;

        public b(Resources resources) {
            this.ॱ = resources;
        }

        public vk<Integer, AssetFileDescriptor> ˏ(vo voVar) {
            return new vq(this.ॱ, voVar.ˊ(Uri.class, AssetFileDescriptor.class));
        }

        public void ॱ() {
        }
    }

    public static class c implements vr<Integer, InputStream> {
        private final Resources ˋ;

        public c(Resources resources) {
            this.ˋ = resources;
        }

        @NonNull
        public vk<Integer, InputStream> ˏ(vo voVar) {
            return new vq(this.ˋ, voVar.ˊ(Uri.class, InputStream.class));
        }

        public void ॱ() {
        }
    }

    public static class d implements vr<Integer, ParcelFileDescriptor> {
        private final Resources ॱ;

        public d(Resources resources) {
            this.ॱ = resources;
        }

        @NonNull
        public vk<Integer, ParcelFileDescriptor> ˏ(vo voVar) {
            return new vq(this.ॱ, voVar.ˊ(Uri.class, ParcelFileDescriptor.class));
        }

        public void ॱ() {
        }
    }

    public static class e implements vr<Integer, Uri> {
        private final Resources ˏ;

        public e(Resources resources) {
            this.ˏ = resources;
        }

        @NonNull
        public vk<Integer, Uri> ˏ(vo voVar) {
            return new vq(this.ˏ, vu.ˏ());
        }

        public void ॱ() {
        }
    }

    public /* synthetic */ boolean ˋ(@NonNull Object obj) {
        return ˎ((Integer) obj);
    }

    public /* synthetic */ o.vk.c ˎ(@NonNull Object obj, int i, int i2, @NonNull sc scVar) {
        return ˋ((Integer) obj, i, i2, scVar);
    }

    public vq(Resources resources, vk<Uri, Data> vkVar) {
        this.ˋ = resources;
        this.ॱ = vkVar;
    }

    public o.vk.c<Data> ˋ(@NonNull Integer num, int i, int i2, @NonNull sc scVar) {
        Uri ˊ = ˊ(num);
        return ˊ == null ? null : this.ॱ.ˎ(ˊ, i, i2, scVar);
    }

    @Nullable
    private Uri ˊ(Integer num) {
        try {
            return Uri.parse("android.resource://" + this.ˋ.getResourcePackageName(num.intValue()) + '/' + this.ˋ.getResourceTypeName(num.intValue()) + '/' + this.ˋ.getResourceEntryName(num.intValue()));
        } catch (Throwable e) {
            if (Log.isLoggable("ResourceLoader", 5)) {
                Log.w("ResourceLoader", "Received invalid resource id: " + num, e);
            }
            return null;
        }
    }

    public boolean ˎ(@NonNull Integer num) {
        return true;
    }
}
